package io.gitee.yth.design.pattern.test.core.pattern.behavioral.state;

/**
 * @author yth
 * @since 2023-05-03-0:30
 */
public class TCPListen extends AbstractTCPState {

    private static final TCPListen instance = new TCPListen();

    public static TCPListen getInstance() {
        return instance;
    }

    private TCPListen() {
    }

    @Override
    public void send(TCPConnection tcpConnection) {
        System.out.println("send ...");
        // send SYN, receive SYN, ACK, etc.
        changeState(tcpConnection, TCPEstablished.getInstance());
    }

}
